Let's take a look at the implementation and summarize it. please correct me if you have any mistakes.I see the source is kernel 2.6.27, ifplugd-0.28.Question 1: Why can only rtm_newlink be obtained when Netlink is used to detect network cable
2430:c language Exercise list set up, insert, delete, outputTime limit: 1 Sec Memory limit: 128 MB
Submitted: 576 settlement: 280
Topic Description
Write a function Creatlink to create a dynamic linked list. (including school numbers and grades)Write a function Printlink to output a linked list.Write a function Dellink to delete a specified node in a dynamic list (a number specified by the argument to delete the student node).Write a function inser
PHP single-chain table
Header ("Content-type: text/html; charset = utf-8 ");
// Linked list node
Class node {
Public static $ count =-1; // Node id
Public $ name; // Node name
Public $ next; // next node
Public $ id;
Public function _ construct ($ name ){
$ This-> id = self: $ count;
$ This-> name = $ name;
$ This-> next = null;
Self: $ count + = 1;
}
}
// Single-chain table
Class singelLinkList {
Private $ header;
Private $ current;
Public $ count;
// Constructor
Public function _ construct
function delLink ($ id ){$ Current = $ this-> header;$ Flag = false;While ($ current-> next! = Null ){If ($ current-> next-> id ==$ id ){$ Flag = true;Break;}$ Current = $ current-> next;}If ($ flag ){$ Current-> next = $ current-> next;} Else {Echo "the node id =". $ id. "is not found! }}
// Obtain the linked listPublic function getLinkList (){$ Current = $ this-> header;If ($ current-> next = null ){Echo ("the linked list is empty! ");Return;}While
Copy CodeThe code is as follows:
Linked list nodesClass Node {public $id; Node IDPublic $name; Node namePublic $next; Next node
Public function __construct ($id, $name) {$this->id = $id;$this->name = $name;$this->next = null;}}
Single linked listClass Singellinklist {Private $header; Linked list head node
Construction methodPublic function __construct ($id = null, $name = null) {$this->header = new node ($id, $name, NULL);}Get the chain table lengthPublic Function Getlinklength () {$i = 0;$cur
element, as shown on the right of the following figure.
Single linked list class Singellinklist {private $header;//Link Header node//Construct method Public Function __construct ($id = NULL, $
name = null) {$this->header = new node ($id, $name, NULL);
//Get the list length public function getlinklength () {$i = 0;
$current = $this->header;
while ($current->next!= null) {$i + +;
$current = $current->next;
return $i;
}//Add node data pu
", url, True);
Xmlhttp.onreadystatechange = Delfileok;
Xmlhttp.send (NULL);
}
Else
{
Alert ("Please select File First!");
}
}
}
function Share ()
{
var fileid= "";
var obj=document.getelementsbyname (' Myselect ');
for (Var i=0 i if (obj[i].checked)
Fileid=fileid+obj[i].value+ ', ';
}
if (Fileid)
{
var url = ".. /shareit.asp?action=sharemyselect= "+fileid+" pid "+math.random" ();
Xmlhttp.open ("Get", url, True);
Xmlhttp.onreadystatechange = Shareok;
Xmlhttp.send (NULL);
}
Else
{
Alert ("Please
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.